package com.example.news_demo.mapper;


import com.example.news_demo.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@Mapper
public interface UserMapper {

    public User getOneById(int id);

    //查询一个用户
    public User getOne(String username);

    public List<User> getAll();

    public void insertUser(@Param("user") User user);

    public void deleteUser(String username,String pwd);
}
